import { onMounted, onUnmounted} from "vue";

const useEvent = (el, event, callback) => {
	onMounted(() => {
		el.addEventListener(event, callback);
	})
	onUnmounted(() => {
		el.removeEventListener(event, callback);
	})
};

export  default useEvent;